﻿# CORE ACCOLADE CATEGORIES
#
# militant		好戦
# courtly		紳士
#
# ethical		道徳
# amoral		非道
#
# champion		戦闘
# leader		指揮
#
# aggressive	攻撃
# defensive		守備
#
# subtle		巧妙
# forceful		強引
#
# equestrian	乗馬


# The Best Samurai of the (east/west/world)
accolade_shogunate_the_best_samurai_of_the_somewhere = {
	key = "accolade_shogunate_the_best_samurai_of_the_somewhere"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					liege = {
						OR = {
							primary_title.tier = tier_empire
							capital_province = { geographical_region = world_region_central_japan_narrow }
						}
					}
				}
				desc = accolade_shogunate_best_samurai_of_the_world
			}
			triggered_desc = {
				trigger = {
					liege = {
						NOT = { primary_title.tier = tier_empire }
						capital_province = { geographical_region = world_region_estern_japan_narrow }
					}
				}
				desc = accolade_shogunate_best_samurai_of_the_east
			}
			triggered_desc = {
				trigger = {
					liege = {
						NOT = { primary_title.tier = tier_empire }
						capital_province = { geographical_region = world_region_western_japan_narrow }
					}
				}
				desc = accolade_shogunate_best_samurai_of_the_west
			}
			triggered_desc = {
				trigger = {
					liege = {
						NOR = {
							primary_title.tier = tier_empire
							capital_province = { geographical_region = world_region_central_japan_narrow }
							capital_province = { geographical_region = world_region_estern_japan_narrow }
							capital_province = { geographical_region = world_region_western_japan_narrow }
						}
					}
				}
				desc = accolade_shogunate_best_samurai
			}
		}
	}

	potential = {
		OR = {
			prowess >= 30
			AND = {
				has_trait = lifestyle_blademaster
				has_trait_xp = {
					trait = lifestyle_blademaster
					value >= 100
				}
			}
		}
		scope:accolade_type = {
			NOR = {
				type_has_accolade_category = amoral
				type_has_accolade_category = forceful
			}
		}
		exists = liege
		exists = liege.primary_title
		liege.primary_title.tier > tier_duchy
	}

	weight = { value = 100 }
}


# The Four Heavenly Kings of (dynasty)
accolade_shogunate_the_four_heavenly_kings_of_dynasty = {
	key = "accolade_shogunate_the_four_heavenly_kings_of_dynasty"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				desc = accolade_shogunate_owner_house
			}
		}
	}

	potential = {
		OR = {
			diplomacy   >= high_skill_rating
			martial     >= high_skill_rating
			stewardship >= high_skill_rating
			intrigue    >= high_skill_rating
			learning    >= high_skill_rating
		}
		scope:accolade_type = {
			NOR = {
				type_has_accolade_category = amoral
				type_has_accolade_category = forceful
			}
		}
		exists = liege
		exists = liege.house
	}

	weight = { value = 25 }
}


# The Three Magistrates of (dynasty/title)
accolade_shogunate_the_three_magistrates_of_dynasty_or_title = {
	key = "accolade_shogunate_the_three_magistrates_of_dynasty_or_title"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.primary_title
					liege.primary_title.tier <= tier_duchy
				}
				desc = accolade_shogunate_owner_title
			}
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.house
				}
				desc = accolade_shogunate_owner_house
			}
		}
	}

	potential = {
		OR = {
			diplomacy   >= high_skill_rating
			stewardship >= high_skill_rating
			learning    >= high_skill_rating
			has_trait = administrator
		}
		scope:accolade_type = {
			OR = {
				type_has_accolade_category = courtly
				type_has_accolade_category = ethical
				type_has_accolade_category = subtle
			}
		}
		exists = liege
		OR = {
			exists = liege.house
			AND = {
				exists = liege.primary_title
				liege.primary_title.tier <= tier_duchy
			}
		}
	}

	weight = { value = 50 }
}


# The (rare something) of (dynasty/title)
accolade_shogunate_the_rare_something_of_dynasty_or_title = {
	key = "accolade_shogunate_the_rare_something_of_dynasty_or_title"

	num_options = 2

	option = {
		random_valid = {
			desc = accolade_shogunate_four_honorable_vassals
			desc = accolade_shogunate_five_honorable_vassals
			desc = accolade_shogunate_three_chief_retainers
			desc = accolade_shogunate_four_chief_retainers
			desc = accolade_shogunate_three_generals
		}
	}

	option = {
		random_valid = {
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.house
				}
				desc = accolade_shogunate_owner_house
			}
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.primary_title
					liege.primary_title.tier <= tier_duchy
				}
				desc = accolade_shogunate_owner_title
			}
		}
	}

	potential = {
		OR = {
			diplomacy   >= high_skill_rating
			martial     >= high_skill_rating
			stewardship >= high_skill_rating
			intrigue    >= high_skill_rating
			learning    >= high_skill_rating
		}
		scope:accolade_type = {
			NOR = {
				type_has_accolade_category = amoral
				type_has_accolade_category = forceful
			}
		}
		exists = liege
		OR = {
			exists = liege.house
			AND = {
				exists = liege.primary_title
				liege.primary_title.tier <= tier_duchy
			}
		}
	}

	weight = { value = 100 }
}


# The (common something) of (dynasty/title)
accolade_shogunate_the_common_something_of_dynasty_or_title = {
	key = "accolade_shogunate_the_common_something_of_dynasty_or_title"

	num_options = 2

	option = {
		random_valid = {
			desc = accolade_shogunate_seven_chief_retainers
			desc = accolade_shogunate_twelve_chief_retainers
			desc = accolade_shogunate_seven_generals
			desc = accolade_shogunate_eight_generals
			desc = accolade_shogunate_twelve_generals
			desc = accolade_shogunate_fifteen_generals
			desc = accolade_shogunate_sixteen_generals
			desc = accolade_shogunate_eighteen_generals
			desc = accolade_shogunate_twenty_four_generals
		}
	}

	option = {
		random_valid = {
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.house
				}
				desc = accolade_shogunate_owner_house
			}
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.primary_title
					liege.primary_title.tier <= tier_duchy
				}
				desc = accolade_shogunate_owner_title
			}
		}
	}

	potential = {
		NOR = {
			diplomacy   >= high_skill_rating
			martial     >= high_skill_rating
			stewardship >= high_skill_rating
			intrigue    >= high_skill_rating
			learning    >= high_skill_rating
		}
		exists = liege
		OR = {
			exists = liege.house
			AND = {
				exists = liege.primary_title
				liege.primary_title.tier <= tier_duchy
			}
		}
	}

	weight = { value = 100 }
}


# The Red Armor of (dynasty)
accolade_shogunate_the_red_armor_of_dynasty = {
	key = "accolade_shogunate_the_red_armor_of_dynasty"

	num_options = 1

	option = {
		first_valid = {
			desc = accolade_shogunate_last_name
		}
	}

	potential = {
		martial >= very_high_skill_rating
		prowess >= very_high_skill_rating
		scope:accolade_type = {
			NOT = { type_has_accolade_category = amoral }
			OR = {
				type_has_accolade_category = militant
				type_has_accolade_category = aggressive
			}
		}
		exists = house
	}

	weight = { value = 100 }
}


# The Strategist of (dynasty)
accolade_shogunate_the_strategist_of_dynasty = {
	key = "accolade_shogunate_the_strategist_of_dynasty"

	num_options = 1

	option = {
		first_valid = {
			desc = accolade_shogunate_owner_house
		}
	}

	potential = {
		OR = {
			martial >= very_high_skill_rating
			has_trait = strategist
		}
		scope:accolade_type = {
			type_has_accolade_category = leader
		}
		exists = liege
		exists = liege.house
	}

	weight = { value = 100 }
}


# The Tea Master of (dynasty)
accolade_shogunate_the_tea_master_of_dynasty = {
	key = "accolade_shogunate_the_tea_master_of_dynasty"

	num_options = 1

	option = {
		first_valid = {
			desc = accolade_shogunate_owner_house
		}
	}

	potential = {
		has_trait = tea_master
		scope:accolade_type = {
			type_has_accolade_category = courtly
		}
		exists = liege
		exists = liege.house
	}

	weight = { value = 200 }
}


# The Blademaster of (title)
accolade_shogunate_the_blademaster_of_title = {
	key = "accolade_shogunate_the_blademaster_of_title"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					liege.primary_title.tier = tier_empire
				}
				desc = accolade_shogunate_the_world
			}
			desc = accolade_shogunate_owner_title
		}
	}

	potential = {
		has_trait = lifestyle_blademaster
		has_trait_xp = {
			trait = lifestyle_blademaster
			value >= 100
		}
		scope:accolade_type = {
			type_has_accolade_category = champion
		}
		exists = liege
		exists = liege.primary_title
	}

	weight = { value = 200 }
}


# The (animal) of (dynasty/title)
accolade_shogunate_the_animal_of_dynasty_or_title = {
	key = "accolade_shogunate_the_animal_of_dynasty_or_title"

	num_options = 2

	option = {
		random_valid = {
			desc = accolade_shogunate_dragon
			desc = accolade_shogunate_tiger
			desc = accolade_shogunate_lion
			desc = accolade_shogunate_bear
			desc = accolade_shogunate_ferocious_tiger
			desc = accolade_shogunate_ferocious_bull
		}
	}

	option = {
		random_valid = {
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.house
				}
				desc = accolade_shogunate_owner_house
			}
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.primary_title
					liege.primary_title.tier <= tier_duchy
				}
				desc = accolade_shogunate_owner_title
			}
		}
	}

	potential = {
		scope:accolade_type = {
			type_has_accolade_category = prowess
			OR = {
				type_has_accolade_category = militant
				type_has_accolade_category = amoral
				type_has_accolade_category = champion
				type_has_accolade_category = aggressive
				type_has_accolade_category = forceful
			}
		}
		exists = liege
		OR = {
			exists = liege.house
			AND = {
				exists = liege.primary_title
				liege.primary_title.tier <= tier_duchy
			}
		}
	}

	weight = { value = 25 }
}


# The (colored ogre) of (dynasty/title)
accolade_shogunate_the_colored_ogre_of_dynasty_or_title = {
	key = "accolade_shogunate_the_colored_ogre_of_dynasty_or_title"

	num_options = 2

	option = {
		random_valid = {
			desc = accolade_shogunate_red_ogre
			desc = accolade_shogunate_blue_ogre
			desc = accolade_shogunate_yellow_ogre
		}
	}

	option = {
		random_valid = {
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.house
				}
				desc = accolade_shogunate_owner_house
			}
			triggered_desc = {
				trigger = {
					exists = liege
					exists = liege.primary_title
					liege.primary_title.tier <= tier_duchy
				}
				desc = accolade_shogunate_owner_title
			}
		}
	}

	potential = {
		scope:accolade_type = {
			type_has_accolade_category = prowess
			OR = {
				type_has_accolade_category = militant
				type_has_accolade_category = amoral
				type_has_accolade_category = champion
				type_has_accolade_category = aggressive
				type_has_accolade_category = forceful
			}
		}
		exists = liege
		OR = {
			exists = liege.house
			AND = {
				exists = liege.primary_title
				liege.primary_title.tier <= tier_duchy
			}
		}
	}

	weight = { value = 25 }
}


# (name) the Ogre
accolade_shogunate_name_the_ogre = {
	key = "accolade_shogunate_name_the_ogre"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					has_any_nickname = yes
				}
				desc = accolade_shogunate_nickname
			}
			desc = accolade_shogunate_first_name
		}
	}

	potential = {
		scope:accolade_type = {
			type_has_accolade_category = prowess
			OR = {
				type_has_accolade_category = militant
				type_has_accolade_category = amoral
				type_has_accolade_category = champion
				type_has_accolade_category = aggressive
				type_has_accolade_category = forceful
			}
		}
	}

	weight = { value = 50 }
}


# (name) the Buddha
accolade_shogunate_name_the_buddha = {
	key = "accolade_shogunate_name_the_buddha"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					has_any_nickname = yes
				}
				desc = accolade_shogunate_nickname
			}
			desc = accolade_shogunate_first_name
		}
	}

	potential = {
		scope:accolade_type = {
			type_has_accolade_category = courtly
			type_has_accolade_category = ethical
		}
	}

	weight = { value = 100 }
}


# (name) the Ninja
accolade_shogunate_name_the_ninja = {
	key = "accolade_shogunate_name_the_ninja"

	num_options = 1

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					has_any_nickname = yes
				}
				desc = accolade_shogunate_nickname
			}
			desc = accolade_shogunate_first_name
		}
	}

	potential = {
		has_trait = ninja
		scope:accolade_type = {
			NOR = {
				type_has_accolade_category = courtly
				type_has_accolade_category = ethical
			}
		}
	}

	weight = { value = 200 }
}


# (name) of the (weapon)
accolade_shogunate_name_of_the_weapon = {
	key = "accolade_shogunate_name_of_the_weapon"

	num_options = 2

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					has_any_nickname = yes
				}
				desc = accolade_shogunate_nickname
			}
			desc = accolade_shogunate_first_name
		}
	}

	option = {
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = {
						shogunate_before_nanbokucho_period_trigger = yes
						scope:accolade_type = {
							type_has_accolade_category = ranged_fighter
						}
					}
				}
				desc = accolade_shogunate_bows
			}
			triggered_desc = {
				trigger = {
					OR = {
						AND = {
							shogunate_before_nanbokucho_period_trigger = no
							shogunate_before_sengoku_period_trigger = yes
						}
						has_trait = lifestyle_blademaster
					}
				}
				desc = accolade_shogunate_swords
			}
			triggered_desc = {
				trigger = {
					shogunate_before_sengoku_period_trigger = no
				}
				desc = accolade_shogunate_spears
			}
		}
	}

	potential = {
		always = yes
	}

	weight = { value = 50 }
}
